#include<bits/stdc++.h>
using namespace std;

vector<int> vec[128];
vector<int> order;

bool isok(char chr){
    return ('a'<=chr && chr<='z') || ('0'<=chr && chr<='9');
}

int main(){
    string str;
    while(cin>>str){
        int len = str.length();
        for(int i=0; i<len; ++i){
            char& chr = str[i];
            if(!isok(chr)) continue;
            if(find(order.begin(), order.end(), chr) == order.end()) order.push_back(chr);
            vec[chr].push_back(i);
        }
    
        for(auto idx: order){
            int len = vec[idx].size();
            if(len <=1 ) continue;
            for(int i=0; i<len; ++i){
                if(i==0) cout<<char(idx)<<':'<<vec[idx][i];
                else cout<<','<<char(idx)<<':'<<vec[idx][i];
            }
            cout<<endl;
        }
    }
    return 0;
}